home *** CD-ROM | disk | FTP | other *** search
- .Na "dbnextrow"
- .Aa
- .Fu
- Read the next result row.
- .Ih "row data, reading"
- .Ih "results row, reading"
- .Sy
- .Sf "STATUS dbnextrow(dbproc)"
- .Sp "DBPROCESS" "*dbproc"
- .Co
- .Bl
- .I "dbnextrow()"
- reads the next row of result data, starting with the first row returned from the \*S.
- Ordinarily, the next result row is read directly from the \*S.
- If the DBBUFFER option is turned on and rows have been read out of order by calling
- .I "dbgetrow()",
- the next row is read instead from a linked list of buffered rows.
- .Ih "DBBUFFER option"
- When \f2dbnextrow()\f1 is called,
- any binding of row data to program variables (as specified with \f2dbbind()\f1 or \f2dbaltbind()\f1)
- takes effect.
- .Bl
- The application must successfully call
- .I "dbresults()"
- before it can make any calls to
- .I "dbnextrow()."
- .Bl
- To determine whether a particular command is one that returns rows and
- needs results processing with \f2dbnextrow()\f1, call \f2DBROWS()\f1 after \f2dbresults()\f1.
- .Bl
- Normally, each result row is processed in turn by repeatedly calling
- .I "dbnextrow()"
- until it returns NO_MORE_ROWS.
- To cancel the current set of results instead, call \f2dbcanquery\f1.
- After a call to \f2dbcanquery()\f1, it is safe to call \f2dbresults()\f1 again.
- .Bl
- The typical sequence of calls is:
- .ta +4n +4n +4n +4n +4n +4n
- .SD
- .so dbnextrow.ex
- .ED
- .Bl
- The \*S can return two types of rows:
- regular rows containing data from columns designated by a SELECT statement's \f2select-list\f1,
- and compute rows resulting from the COMPUTE clause.
- To facilitate the processing of result rows from \*S,
- \f2dbnextrow()\f1 returns different values according to the type of row.
- See the section ``RETURNS'' for details.
- .Bl
- To display \*S result data on the default output device,
- you can use \f2dbprrow()\f1 instead of \f2dbnextrow()\f1.
- .Bl
- An asynchronous version of \f2dbnextrow()\f1, called \f2dbnextrow_a()\f1, is available for VMS.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .in -.375i
- .Re
- .br
- \f2dbnextrow()\f1 can return five different types of values:
- .Bl
- If a regular row is read,
- REG_ROW is returned.
- .Ih "regular row, determining"
- .Bl
- If a compute row is read,
- the \f2computeid\f1 of the row is returned.
- (See \f2dbaltbind()\f1 for information on the \f2computeid\f1.)
- .Ih "compute row, determining"
- .Ih "row type, determining"
- .Bl
- If there
- are no more rows to be read or the command didn't return any rows,
- NO_MORE_ROWS is returned.
- .Bl
- If buffering is turned on and reading the next row would cause the buffer
- to be exceeded,
- BUF_FULL is returned.
- In this case, no row will have been read. To read any more rows,
- at least one row must first be
- pruned from the top of the row buffer
- by calling
- .I "dbclrbuf()."
- .Bl
- If the routine was unsuccessful, FAIL is returned.
- .Bz
- .Sa
- dbaltbind,
- dbbind,
- dbcanquery,
- dbclrbuf,
- dbgetrow,
- dbnextrow_a,
- dbprrow,
- options
-